package org.caw.domain;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "row")
public class Row implements Serializable {

	private static final long serialVersionUID = -751209118772352901L;

	@XmlElement(name = "familyNames")
	private List<String> familyNames;

	@XmlElement(name = "rowkey")
	private String rowKey;

	@XmlElement(name = "family")
	private List<Family> families;

	public String getRowKey() {
		return rowKey;
	}

	public void setRowKey(String rowKey) {
		this.rowKey = rowKey;
	}

	public List<Family> getFamilies() {
		return families;
	}

	public void setFamilies(List<Family> families) {
		this.families = families;
	}

	public List<String> getFamilyNames() {
		return familyNames;
	}

	public void setFamilyNames(List<String> familyNames) {
		this.familyNames = familyNames;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Row && ((Row) obj).getRowKey().equals(rowKey)) {
			return true;
		}
		return super.equals(obj);
	}

}
